package com.tsmti.task.service;

import com.tsmti.core.common.service.BaseService;
import com.tsmti.task.entity.ScheduleJob;
import org.quartz.SchedulerException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Package：com.tsmti.task.service
 * @Class：ScheduleJobService
 * @Description： TODO
 * @Author：zcw
 * @Date：Created in 2018/5/15 22:38
 * @Company:
 * @Version：
 * @Modified By:
 */
public interface ScheduleJobService extends BaseService<ScheduleJob> {

    /**
     * 初始化任务
     * @throws SchedulerException
     */
     void initSchedule() throws SchedulerException;

    /**
     * 更改状态
     * @param jobId
     * @param cmd
     * @throws SchedulerException
     */
     void changeStatus(String jobId, String cmd) throws SchedulerException;

    /**
     * 更改任务 cron表达式
     * @param jobId
     * @throws SchedulerException
     */
     void updateCron(String jobId) throws SchedulerException;
}
